import request from '@/utils/request'

/**
 * 获取字典
 * @param data
 * @returns {*}
 */
export function getDictEnum(data) {
  return request({
    url: '/commen',
    method: 'get',
    params: {
      name: data
    }
  })
}

export function getDictEnumList(data) {
  return request({
    url: '/commen/list',
    method: 'get',
    params: data
  })
}

/**
 * 获取审核违规日志
 * @param data
 * @returns {*}
 */
export function getAuditLog(data) {
  return request({
    url: '/commen/auditlog',
    method: 'get',
    params: {
      content_type: data.content_type,
      content_id: data.content_id
    }
  })
}

export function createadnUpdateDictEnum(data) {
  return request({
    url: '/commen',
    method: 'POST',
    data: data
  })
}

export function deleteDictEnum(data) {
  return request({
    url: `/commen/${data}`,
    method: 'delete'
  })
}

export function uploadImage(data) {
  return request({
    url: `/upload`,
    method: 'post',
    headers: {
      'Content-Type': 'multipart/form-data'
    },
    data: data
  })
}

export function getDirections() {
  return request({
    url: `/commen/direction`,
    method: 'get'
  })
}




